Method for automatically focusing on target object, photographic apparatus including automatic focus function, and computer readable medium storing automatic focus function program

ABSTRACT

A method capable of performing an automatic focus function upon a specific movable object in a real-time manner, the method being applicable to a photographic apparatus with the automatic focus function, includes: capturing real-time image within a field of view (FOV) of a lens; comparing images of a plurality of image areas of the real-time image with a feature image of the specific movable object to identify an image area corresponding to the feature image of the specific movable object; and, performing automatic focus on the identified image area.

CROSS REFERENCE TO RELATED APPLICATION

This application is a continuation application of U.S. application Ser.No. 16/404,878, filed on May 7, 2019, which is a continuationapplication of U.S. application Ser. No. 16/235,061, filed on Dec. 28,2018, which is a continuation application of U.S. application Ser. No.16/051,713, filed on Aug. 1, 2018, which is a continuation applicationof U.S. application Ser. No. 13/737,920, filed on Jan. 9, 2013, andclaims the priority benefit of Taiwan Patent Application Serial Number101143673, filed on Nov. 22, 2012, the full disclosure of which isincorporated herein by reference.

BACKGROUND 1. Field of the Disclosure

The disclosed embodiments of the present invention relate to aphotographic mechanism, and more particularly, to a method forautomatically focusing on a specific movable object, relatedphotographic apparatus, and related computer readable storage medium.

2. Description of the Related Art

The existing photographic technology is capable of performing the facedetection or the smile detection upon people within the field of view ofthe lens. The existing technology, however, is only able to detect allthe characters, and cannot distinguish between the desired photographingtarget which is usually the main character and the backgroundcharacters. In static photographing, users have plenty of time to fixthe deviated focus manually to refocus on the desired target characters;however, in dynamic photographing, users do not have time to fix thedeviated focus manually. Therefore, even if the existing photographictechnique is able to detect all the faces in a field of view, there is agreat possibility that the actual focus is on the background charactersinstead of the desired main character, resulting in the captured picturethat is out of focus and is unwanted to the users.

SUMMARY

Therefore, one of the objectives of the present invention is to providea method for automatically focusing on a specific movable object,related photographic apparatus, and related computer readable storagemedium, to solve the above-mentioned issues.

The present disclosure provides a method of performing an automaticfocus function upon a target object. The method is applicable to aphotographic apparatus including a photographing button, a lens, and astorage circuit, which stores a feature of the target object generatedby processing at least one reference image before the photographingbutton is pressed. The method includes the steps of: capturing an imagethrough the lens; comparing the captured image with the previouslystored feature of the target object for identifying an image area in thecaptured image containing the previously stored feature of the targetobject; and performing automatic focus of the lens, upon pressing thephotographing button, on the image area in the captured image containingthe previously stored feature of the target object.

The present disclosure further provides a photographic apparatus with anautomatic focus function including a photographing button, a lens, astorage circuit and a processing circuit. The storage circuit isconfigured to store a feature of a target object previously obtained byprocessing at least one reference image before the photographing buttonis pressed. The processing circuit is electrically coupled to the lens,and configured to compare an image, captured through the lens, with thepreviously stored feature of the target object to identify an image areain the captured image containing the previously stored feature of thetarget object, and automatically focus the lens, upon pressing thephotographing button, on the image area in the captured image containingthe previously stored feature of the target object.

The present disclosure further provides a non-transitorycomputer-readable medium, storing a computer program for performing anautomatic focus function upon a target object. The computer program,when executed by a photographic apparatus, which comprises aphotographing button, a lens and a storage circuit that stores a featureof the target object generated by processing at least one referenceimage before the photographing button is pressed, causes thephotographic apparatus to execute: capturing an image through the lens;comparing the captured image with the previously stored feature of thetarget object for identifying an image area in the captured imagecontaining the previously stored feature of the target object; andperforming automatic focus of the lens, upon pressing the photographingbutton, on the image area in the captured image containing thepreviously stored feature of the target object.

The present disclosure further provides a method of performing anautomatic focus function upon a specific target object. The method isapplicable to a photographic apparatus comprising a lens and a storagecircuit, which stores a feature of the target object generated byprocessing at least one reference image before a photographing button isinitiated. The method includes the steps of: capturing images throughthe lens; comparing each of the captured images with the previouslystored feature of the target object in the storage circuit foridentifying an image area in each of the captured images containing thepreviously stored feature of the target object; and performing automaticfocus of the lens, upon initiating photographing, on the image area inthe captured images containing the previously stored feature of thetarget object.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a photographic apparatus with anautomatic focus function according to a preferred embodiment of thepresent invention.

FIG. 2A is a diagram illustrating multiple real-time images capturedwithin the field of view of the lens at different time points.

FIG. 2B is another diagram illustrating multiple real-time imagescaptured within the field of view of the lens at different time points.

FIG. 3 is a block diagram illustrating a photographic apparatus with anautomatic focus function according to another embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE EMBODIMENT

Certain terms are used throughout the description and following claimsto refer to particular components. As one skilled in the art willappreciate, manufacturers may refer to a component by different namesThis document does not intend to distinguish between components thatdiffer in name but not function. In the following description and in theclaims, the terms “include” and “comprise” are used in an open-endedfashion, and thus should be interpreted to mean “include, but notlimited to . . . ”. Also, the term “couple” is intended to mean eitheran indirect or direct electrical connection. Accordingly, if one deviceis electrically connected to another device, that connection may bethrough a direct electrical connection, or through an indirectelectrical connection via other devices and connections.

Please refer to FIG. 1, which is a block diagram illustrating aphotographic apparatus 100 with an automatic focus function according toa preferred embodiment of the present invention. The photographicapparatus 100 includes a lens 105, a storage circuit 110, and aprocessing circuit 115. The lens 105 is used to capture a real-timeimage IMG_RT within the field of view range of the lens 105. Inaddition, before capturing the real-time image IMG_RT, the lens 105captures at least one reference image IMG_P of a specific movable object(i.e., a target photographic object) in advance, and then outputs thereal-time image IMG_RT 105 captured by the lens 105 as well as thepre-captured reference image IMG_P to the processing circuit 115. Theprocessing circuit 115 is coupled to the lens 105, and used forprocessing the reference image IMG_P captured in advance to generate thefeature image IMG_F of the specific movable object, and storing thefeature image IMG_F in the storage circuit 110, where the storagecircuit 110 is used to record the feature image IMG_F of the specificmovable object into a database. After lens 105 captures the real-timeimage IMG_RT, the processing circuit 115 can compare images of aplurality of image areas of the real-time image IMG_RT with the featureimage IMG_F of the specific movable object one by one according to thereal-time image IMG_RT captured by the lens and the feature image IMG_Frecorded in the database, thereby identifying the image areacorresponding to the feature image IMG_F of the specific movable objectfrom the plurality of image areas. After the image area is identified,the processing circuit 115 controls the lens 105 to focus on theidentified image area, and therefore achieves the automatic focusfunction.

In this embodiment, the specific movable object may be a specificmovable target object. For example, the target object may be a specifictarget person or target animal. When the lens 105 captures the real-timeimage IMG_RT for each time point according to a capture rate, if thetarget person or target animal moves, then the position where the targetperson or target animal is located within the field of view of the lens105 may vary with time. For example, please refer to FIG. 2A and FIG.2B, FIG. 2A and FIG. 2B are diagrams illustrating multiple real-timeimages IMG_RT captured within the field of view 210 of the lens 105 atdifferent time points t0 and t1. As shown in FIG. 2A, reference numerals205A-205C indicate images and locations of different characters whichare arranged in the order of positions, wherein the reference numeral205A represents an image of a target character, and the target character205A has a behavior of moving along with the time. As a result, thetarget character and a character 205B interchange positions with eachother. As shown in FIG. 2B, the target character 205A is now locatedbetween the character 205B and the character 205C. The photographicapparatus 100 in the present embodiment is capable of continuouslyfocusing on the target character 205A automatically. At the time pointt0, the photographic apparatus 100 is capable of focusing on the frontposition shown in FIG. 2A where the target character 205A is located,while at the time point t1, the photographic apparatus 100 is capable offocusing on the middle position shown in FIG. 2B where the targetcharacter 205A is located. No matter how the target character moves, thephotographic apparatus 100 is able to identify the image position of thetarget character as long as the target character is still within thefield of view of the lens 105. Also, the lens 105 would focus on theposition of the image so that the user does not have to worry that theimage may be out of focus, but simply presses a button (e. g., aphysical button or a virtual button) at any moment he/she wants tophotograph to obtain a high-quality image with accurate focus andwithout distortion. In addition, the automatic focus function mentionedabove is also suitable for filming. When the user utilizes thephotographic apparatus 100 to photograph the target character 205A,after the user presses the photographing button, the photographicapparatus 100 would identify the location of the target character andthen the lens 105 would focus on it. Hence, the user does not need to beconcerned about the out-of-focus issues while using the photographicapparatus 100.

The real-time image identification and automatic focus operation of thephotographic apparatus 100 are described as follows. The lens 105extracts the real-time image IMG_RT based on an appropriate frequency,wherein the content of a real-time image IMG_RT is like the image of thefield of view shown in FIG. 2A or FIG. 2B. The captured real-time imageIMG_RT is sent to the processing circuit 115, and the processing circuit115 identifies the specific target character from the plurality of imageobjects within the real-time image IMG_RT. First of all, the processingcircuit 115 analyzes the image objects within the real-time image IMG_RTto obtain the possible image position of the target character.Practically, the processing circuit 115 may use a face detectionoperation to obtain multiple image-area positions corresponding tomultiple characters (which is regarded as multiple movable objects)respectively, followed by identifying the correct image position of thetarget character from the image-area positions. After the image-areaposition or area of the specific target character is identified, theprocessing circuit 115 may control the lens 105 to focus on theimage-area of the identified target character to achieve the automaticfocus function. For instance, as shown in FIG. 2A, by means of the facedetection operation, the processing circuit 115 may obtain the analysisresult showing that the real-time image includes the image-areapositions of the plurality of characters 205A-205C, and then comparesthe images located in the above-mentioned image-area positions with thefeature image IMG_F of the target character, respectively, to therebyidentify that the correct image position of the target character is theimage position of the image 205A. Therefore, the processing circuit 115can control the lens 105 to focus on the identified target characterimage 205A, to achieve the effect of automatic focus. It should be notedthat, the aforementioned specific movable object is not limited to thetarget character. In other embodiments, it may be a target animal, amoving target object (e.g., a vehicle such as a car) and so on. In otherwords, the automatic focus function of the photographic apparatus 100 ofthe present invention is applicable to photographing target characters,target animals, or moving target objects. Besides, face detection isutilized to analyze the possible image-area position of the charactersin the real-time image IMG_RT in aforementioned embodiment. However,this is not a limitation of the present invention. In practice, otherdetection operations may be utilized in the analysis of the possibleimage-area position of the real-time image.

In addition, please note that the real-time image IMG_RT obtained by thelens 105 refers to the real-time image imaged on the capacitive couplingelement array within the field of view of the lens 105 throughreflection of light while the user operates the photographic apparatus100. In other words, the real-time image IMG_RT obtained by the lens 105refers to the image imaged on the photosensitive elements of thephotographic apparatus 100 in a real time manner before the user pressesthe photographing button, and the real-time image IMG_RT would presentdifferent imaging results in response to the objects varying or movingwithin the field of view of the lens 105. That is, the real-time imageIMG_RT refers to the image captured by the lens 105 instantly while theuser is photographing formally. In addition, the pre-stored referenceimage IMG_P refers to the reference image obtained by capturing aspecific character or a specific animal before the user photographsformally. The reference image IMG_P includes the feature of the specifictarget character or the specific animal, and is utilized to generate thefeature image IMG_F of the specific moving object, where the feature(can be regarded as the feature image) would be referenced by theprocessing circuit 115 to perform automatic focus upon part of thereal-time image IMG_RT.

In a practical operation, the photographic apparatus 100 allows the userto pre-photograph first before the formal photographing, thus creatingan image database of the specific moving object. Next, the followingsteps would check whether the real-time image IMG_RT is the same as thefeature image IMG_F resulting from the reference image of the imagedatabase, and identify whether the specific moving object exists on thephotosensitive screen as well as the corresponding position. After theidentification is done, the automatic focus operation is performed suchthat the focus would be directed to the image position of the specificmovable object to achieve the automatic tracking and focusing effect.Regarding the pre-photographing process, the processing circuit 115controls the lens 105 to pre-shoot at least one reference image IMG_P ofthe specific movable object. After that, the processing circuit 115generates the feature images IMG_F according to the at least onereference image IMG_P, and records the feature image IMG_F of thespecific movable object into the database through the storage circuit110. It should be noted that, if there is only one pre-photographingreference image, the process of generating the feature image maydirectly utilize the image corresponding to the specific movable objectof the reference image IMG_P (i.e., part of the image of the referenceimage) as the feature image IMG_F of the specific movable object.Conversely, if there is more than one pre-photographing reference imageIMG_P, the process of generating the feature image IMG_F may utilize animage corresponding to the specific movable object within an averageimage derived from averaging the reference images IMG_P (i.e., part ofthe average image) as the feature image IMG_F of the specific movableobject. Besides, any other processes of generating the feature imageaccording to the reference image all obey the spirit of the presentinvention, and also belong to the scope of the present invention.

Besides, in a practical design where a target character is shot toobtain the feature image IMG_F, the pre-photographed feature image IMG_Fmay be physiological characteristics such as the target character's faceor appearance, the shape of the facial features, skin color, hair, etc.Besides, in other embodiments, the feature image may be thecharacteristics of the target character's dressing, characteristics ofthe target character's accessories, or characteristics of the targetcharacter's belongings. For example, the color and style of the coat,the type and style of jewelry, portable packages, rain gears, and so on.By pre-photographing the feature image IMG_F of the target character,the processing circuit 115 can identify the accurate image position ofthe target character in a real time manner from a real-time imageIMG_RT, which includes a number of characters. Therefore, this makes thephotographic apparatus 100 applicable to capturing a specific targetcharacter or some specific target characters among a group of movingcharacters.

Furthermore, in other embodiments, the operations performed by theaforementioned processing circuit 115 may be realized by a computerprogram code. Please refer to FIG. 3, which is a block diagramillustrating a photographic apparatus 300 with an automatic focusfunction according to another embodiment of the present invention. Thephotographic apparatus 300 includes a lens 305, a storage circuit 310,and a processor 315, wherein the storage circuit 310 is acomputer-readable storage medium implemented by a memory element andhaving a computer program COMP stored therein. The processor 315 readsand executes the computer program stored in the storage circuit 310 toperform the step of automatically focusing on a specific movable objectin a real-time manner. The steps include capturing the real-time imageIMG_RT, comparing the real-time image IMG_RT with the feature imageIMG_F to identify the specific movable target object, and performingautomatic focus upon the identified image area to achieve the automatictracking and focusing effect. As the aforementioned steps are similar tothe operation steps of the photographic apparatus 100 shown in FIG I,the description is omitted here for brevity. Moreover, in otherembodiments, the computer program COMP may be stored in an externalmemory element. When the photographic apparatus 300 boots up, theprocessor 315 reads the computer program COMP and stores it into thestorage circuit 310 for subsequent use.

Based on the above descriptions, when a user uses the photographicapparatus 100/300 of the embodiment of the present invention, the targetfeature image IMG_F can be obtained by means of pre-photographing beforethe formal photographing is initiated, so the target identification canbe done during the formal photographing. In this way, the photographicapparatus 100/300 can identify the specific target within the field ofview of the lens 105/305, and then automatically focus on the target.Therefore, the user simply needs to press the photographing button toobtain properly focused images. In addition, while a target character isbeing photographed, the aforementioned target identification andautomatic focusing function of the present invention may be combinedwith the function and operation of smile detection photographing. Hence,the focus is on the target character by using the aforementioned targetidentification and automatic focus function, and then an image iscaptured according to the smile detection photographing. In this way,the user can get the high-quality image of the target characters withoutpressing the photographing button. Furthermore, in the above-describedembodiments, the photographic apparatus 100/300 may be disposed in acamera apparatus, a mobile communication device, or any handheldportable apparatus. These all belong to the scope of the presentinvention.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

What is claimed is:
 1. A method of performing an automatic focusfunction upon a target object, the method being applicable to aphotographic apparatus comprising a photographing button, a lens, and astorage circuit, which stores a feature of the target object generatedby processing at least one reference image before the photographingbutton is pressed, the method comprising: capturing an image through thelens; comparing the captured image with the previously stored feature ofthe target object for identifying an image area in the captured imagecontaining the previously stored feature of the target object; andperforming automatic focus of the lens, upon pressing the photographingbutton, on the image area in the captured image containing thepreviously stored feature of the target object.
 2. The method of claim1, wherein said identifying comprises: identifying the previously storedfeature of the target object from a plurality of image areascorresponding to a plurality of image objects.
 3. The method of claim 1,further comprising: capturing one image for each time point according toa capture rate.
 4. The method of claim 3, further comprising:continuously focusing on, after the photographing button is pressed, theimage area in the captured one image containing the previously storedfeature of the target object at the each time point.
 5. The method ofclaim 1, wherein the photographing button is a physical button or avirtual button.
 6. The method of claim 1, wherein the target objectcomprises at least one of a facial feature, skin color, hair, dressing,an accessory, belongings, a gear and a jewelry.
 7. A photographicapparatus with an automatic focus function, comprising: a photographingbutton; a lens; a storage circuit configured to store a feature of atarget object previously obtained by processing at least one referenceimage before the photographing button is pressed; and a processingcircuit electrically coupled to the lens, and configured to compare animage, captured through the lens, with the previously stored feature ofthe target object to identify an image area in the captured imagecontaining the previously stored feature of the target object, andautomatically focus the lens, upon pressing the photographing button, onthe image area in the captured image containing the previously storedfeature of the target object.
 8. The photographic apparatus of claim 7,wherein the photographic apparatus is disposed on a mobile communicationapparatus or a camera apparatus.
 9. The photographic apparatus of claim7, wherein the processing circuit is configured to identify thepreviously stored feature of the target object from a plurality of imageareas corresponding to a plurality of image objects.
 10. Thephotographic apparatus of claim 7, wherein the lens is furtherconfigured to capture one image for each time point according to acapture rate.
 11. The photographic apparatus of claim 10, wherein thelens is continuously focused on, after the photographing button ispressed, the image area in the captured one image containing thepreviously stored feature of the target object at the each time point.12. The photographic apparatus of claim 7, wherein the photographingbutton is a physical button or a virtual button.
 13. The photographicapparatus of claim 7, wherein the target object comprises at least oneof a facial feature, skin color, hair, dressing, an accessory,belongings, a gear and a jewelry.
 14. A non-transitory computer-readablemedium, storing a computer program for performing an automatic focusfunction upon a target object, the computer program, when executed by aphotographic apparatus, which comprises a photographing button, a lensand a storage circuit that stores a feature of the target objectgenerated by processing at least one reference image before thephotographing button is pressed, causing the photographic apparatus toexecute: capturing an image through the lens; comparing the capturedimage with the previously stored feature of the target object foridentifying an image area in the captured image containing thepreviously stored feature of the target object; and performing automaticfocus of the lens, upon pressing the photographing button, on the imagearea in the captured image containing the previously stored feature ofthe target object.
 15. The computer-readable medium of claim 14, whereinsaid identifying comprises: identifying the previously stored feature ofthe target object from a plurality of image areas corresponding to aplurality of image objects.
 16. The computer-readable medium of claim14, wherein the target object comprises at least one of a facialfeature, skin color, hair, dressing, an accessory, belongings, a gearand a jewelry.
 17. A method of performing an automatic focus functionupon a target object, the method being applicable to a photographicapparatus comprising a lens and a storage circuit, which stores afeature of the target object generated by processing at least onereference image before a photographing button is initiated, the methodcomprising: capturing images through the lens; comparing each of thecaptured images with the previously stored feature of the target objectin the storage circuit for identifying an image area in each of thecaptured images containing the previously stored feature of the targetobject; and performing automatic focus of the lens, upon initiatingphotographing, on the image area in the captured images containing thepreviously stored feature of the target object.
 18. The method of claim17, wherein the target object comprises at least one of a facialfeature, skin color, hair, dressing, an accessory, belongings, a gearand a jewelry.